
// import Cookies from 'js-cookie';
import axios from 'axios';

//设置
export const member = axios.create({
	baseURL: 'https://member.api.lanaoboxiang.com/api',
	// baseURL: 'http://member.api.bxfzrj.com:8080/api',
	timeout: 5000,
	Accept:"application/json",
 	"Content-Type":"application/json",
	headers : {
		common : {
			Authorization : localStorage.getItem("apiKey")
		}
	}
});


export const order = axios.create({
	baseURL: 'https://order.api.lanaoboxiang.com/api',
	// baseURL: 'http://order.api.bxfzrj.com:8080/api',
	timeout: 5000,
	Accept:"application/json",
 	"Content-Type":"application/json",
	headers : {
		common : {
			Authorization : localStorage.getItem("apiKey")
		}
	}
});

export const setting = axios.create({
  baseURL: 'https://setting.api.lanaoboxiang.com/api',
  // baseURL: 'http://setting.api.bxfzrj.com:8080/api',
  timeout: 5000,
  Accept:"application/json",
  "Content-Type":"application/json",
  headers : {
    common : {
      Authorization : localStorage.getItem("apiKey")
    }
  }
});

export const item = axios.create({
  baseURL: 'https://item.api.lanaoboxiang.com/api',
  // baseURL: 'http://item.api.bxfzrj.com:8080/api',
  timeout: 5000,
  Accept:"application/json",
  "Content-Type":"application/json",
  headers : {
    common : {
      Authorization : localStorage.getItem("apiKey")
    }
  }
});

//经销商账户
export const capital = axios.create({
  baseURL: 'https://capital.api.lanaoboxiang.com/api',
  // baseURL: 'http://capital.api.bxfzrj.com:8080/api',
  timeout: 5000,
  Accept:"application/json",
  "Content-Type":"application/json",
  headers : {
    common : {
      Authorization : localStorage.getItem("apiKey")
    }
  }
});

export const passport = axios.create({
  baseURL: 'https://passport.api.lanaoboxiang.com/api',
  // baseURL: 'http://passport.api.bxfzrj.com:8080/api',
  timeout: 5000,
  Accept:"application/json",
  "Content-Type":"application/json",
  headers : {
    common : {
      Authorization : localStorage.getItem("apiKey")
    }
  }
});

//暴露成数组一遍循环赋值
export default [member,order,setting,item,capital,passport];
